<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:th="http://www.thymeleaf.org">
  <head>
    <title>Taco Cloud</title>
    <link rel="stylesheet" th:href="@{/styles.css}" />
  </head>
  
  <body>
  
    <form method="POST" th:action="@{/orders}" th:object="${order}">
      
      <img th:src="@{/images/pic.png}"/>
    	
      <h3>请填写你的信息:</h3>
      
      <div th:if="${#fields.hasErrors()}">
        <span class="validationError">
        Please correct the problems below and resubmit.
        </span>
      </div>
      
      <label for="name">name: </label>
      <input type="text" th:field="*{name}"/>
      <span class="validationError"
            th:if="${#fields.hasErrors('name')}" 
            th:errors="*{name}">Name Error</span>
      <br/>
      
      <label for="number">number: </label>
      <input type="text" th:field="*{number}"/>
      <span class="validationError"
            th:if="${#fields.hasErrors('number')}" 
            th:errors="*{number}">Number Error</span>
      <br/>
      
      <label for="year">year: </label>
      <input type="text" th:field="*{year}"/>
      <span class="validationError"
            th:if="${#fields.hasErrors('year')}" 
            th:errors="*{year}">Year Error</span>
      <br/>
      
      <label for="major">major: </label>
      <input type="text" th:field="*{major}"/>
      <span class="validationError"
            th:if="${#fields.hasErrors('major')}" 
            th:errors="*{major}">major Error</span>
      <br/>
      
      <label for="college">college: </label>
      <input type="text" th:field="*{college}"/>
      <span class="validationError"
            th:if="${#fields.hasErrors('college')}" 
            th:errors="*{college}">college Error</span>
      <br/>
      
      
      <input type="submit" value="提交"/>
    </form>
  
  </body>
</html>
